
#include<stdio.h> 

int gys(int a, int b) {
	int r = a % b;
	while (r != 0) {
		a = b;
		b = r;
		r = a % b;
	}
	return b;
}
int main() {

	int fz = 4;int  fm = 8;

		int y = gys(fz, fm);
	printf("%d",y);
	return 0;
}
